﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<photogalleryMVC.Models.LogOnModel>" %>


    <% using (Html.BeginForm("LogOn","Account",new{returnUrl=Request.RawUrl } )) { %>
        
        <div> 
                <p>
                     <%: Html.ActionLink("No account? Register.", "Register",null,new{@class="reference"} ) %> 
                </p>
                <p>
                    <%=Html.ActionLink("Forgot password?", "GetQuestion", "Account", null, new { @class = "reference" })%>
                </p>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.UserName) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.UserName) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Password) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.Password) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.CheckBoxFor(m => m.RememberMe) %>
                    <%: Html.LabelFor(m => m.RememberMe) %>
                </div>
                  <p>   
                    <input type="submit" value="Log On" />
                 </p>
                 <p class="error">
                    <%= TempData.ContainsKey( "LogOnMessage")?TempData["LogOnMessage"]:string.Empty%>

                 </p>
                
        </div>
    <% } %>
     
       
   